// @ts-ignore
import packageJSON from '../package.json';
/**
 * @en 
 * @zh 为扩展的主进程的注册方法
 */
export const methods: { [key: string]: (...any: any) => any } = {
    openPanel() {
        
        Editor.Panel.open(packageJSON.name);
        
    },
};
function testPromise(){
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            reject(new Error("扩展Promise报错"))
        }, 10);
    });
}
function testExtensionError(){
    testExtensionError2();
}
function testExtensionError2(){

    console.error(new Error("扩展嵌套调用报错"))
    testPromise();
}
/**
 * @en Hooks triggered after extension loading is complete
 * @zh 扩展加载完成后触发的钩子
 */
export function load() { 
    console.error(new Error("扩展报错"));
    testExtensionError()
}
console.error(new Error("扩展顶层报错"));

/**
 * @en Hooks triggered after extension uninstallation is complete
 * @zh 扩展卸载完成后触发的钩子
 */
export function unload() { }
